package com.example.student.Repository;
import com.example.student.entity.Student;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface StudentRepository extends JpaRepository<Student, Long> {
    // 这里可以添加自定义的查询方法
    List<Student> findByNameContaining(String name);
    Optional<Student> findByStudentId(Long studentId);
    List<Student> findByClassInfo(Class classInfo);
}